import axiosApi from './base'

export function saveMailInfo(data) {
  return axiosApi({
    url: `/business/preservationInfo/saveMailInfo`,
    method: 'POST',
    data
  })
}

export function updateMailInfo(data) {
  return axiosApi({
    url: `/business/preservationInfo/editMail`,
    method: 'POST',
    data
  })
}
export function queryPolicyByPage(data) {
  return axiosApi({
    url: `/ci/cockpit/queryPolicyByPage`,
    method: 'POST',
    data
  })
}

// 入保附件下载
export function downloadAttachment(params) {
  return axiosApi({
    url: `/ci/cockpit/downloadInsuredAttachment`,
    method: 'GET',
    responseType: 'blob',
    params
  })
}
export function getPageContact(data) {
  return axiosApi({
    url: `/ci/insured/contact/getPageContact`,
    method: 'POST',
    data
  })
}
export function removeContact(data) {
  return axiosApi({
    url: `/ci/insured/contact/dealContactInfo/remove`,
    method: 'POST',
    data
  })
}

export function addContack(data) {
  return axiosApi({
    url: `/ci/insured/contact/dealContactInfo/add`,
    method: 'POST',
    data
  })
}
export function modifyContack(data) {
  return axiosApi({
    url: `/ci/insured/contact/dealContactInfo/modify`,
    method: 'POST',
    data
  })
}
export function getPageEmails(data) {
  return axiosApi({
    url: `/ci/insured/email/getPageEmails`,
    method: 'POST',
    data
  })
}

export function removeEmail(data) {
  return axiosApi({
    url: `/ci/insured/email/dealEmailInfo/remove`,
    method: 'POST',
    data
  })
}

export function addEmail(data) {
  return axiosApi({
    url: `/ci/insured/email/dealEmailInfo/add`,
    method: 'POST',
    data
  })
}
export function modifyEmail(data) {
  return axiosApi({
    url: `/ci/insured/email/dealEmailInfo/modify`,
    method: 'POST',
    data
  })
}
export function updateCardStatus(data) {
  return axiosApi({
    url: `/ci/insured/card/updateCardStatus`,
    method: 'POST',
    data
  })
}
export function queryPolicyInfo(data) {
  return axiosApi({
    url: `/ci/cockpit/queryPolicyInfo`,
    method: 'POST',
    data
  })
}
